<template>
  <div class="table-header">
    <div class="text-box" v-for="(item, index) in headerData" :key="index">
      <el-input v-if="item.name=='代付总笔数'" :value="item.MerchantAmount+'笔'" readonly>
        <template slot="prepend">{{ item.name }}</template>
      </el-input>
      <el-input v-else :value="item.MerchantAmount+'元'" readonly>
        <template slot="prepend">{{ item.name }}</template>
      </el-input>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    headerData: Array,
  },
};
</script>

<style lang="scss" scoped>
.table-header {
  background-color: rgb(236, 234, 234);
  display: flex;
  padding: 5px 0;
  flex-wrap: wrap;
  .text-box {
    margin-left: 40px;
    display: flex;
    width: 450px;
    padding: 10px;
    font-size: 20px;
    .title-txt {
      font-size: 15px;
      padding: 5px;
      font-weight: bold;
    }
    .txt {
      width: 150px;
      height: 20px;
      margin-left: 40px;
      padding: 5px;
      border: 1px solid rgb(168, 166, 166);
      font-size: 15px;
      background-color: rgba(255, 255, 255, 0.466);
    }
  }
}
</style>